﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using App.Entity;
using App.IServices;
using FluentValidation.Results;

namespace App.Site.Controllers
{
    public class DefaultController : BaseController
    {
        public DefaultController(IUserServices _IUserServices)
        {
            base._IUserServices = _IUserServices;
        }

        // GET: Default
        public ActionResult Index()
        {
            UserEntity userEntity = new UserEntity()
            {
                UserName = "我"
            };
            UserEntityValidator validator = new UserEntityValidator();
            ValidationResult results = validator.Validate(userEntity);
            bool validationSucceeded = results.IsValid;
            IList<ValidationFailure> failures = results.Errors;

            return View();
        }
    }
}